import 'package:flutter/material.dart';

class MyApp6 extends StatelessWidget {
  const MyApp6({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //1.导航
      appBar: AppBar(
        title: const Text('Image组件'),
        backgroundColor: Colors.pink,
      ),
      //2.内容
      body: Container(
          width: 300,
          height: 300,
          //背景颜色
          color: Colors.yellow,
          // child: Image.network(
          //   'https://img0.baidu.com/it/u=794816915,1474278636&fm=253&fmt=auto&app=120&f=JPEG?w=508&h=500',

          //   fit: BoxFit.contain,
          //   // //背景颜色
          //   // color: Colors.yellow,
          // ),
          child: Image.asset('1.jpeg')),
    );
  }
}
